package com.jiang;

import com.jiang.dao.BookDao;
import com.jiang.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Apptest {
    public static void main(String[] args) {
        
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        
        BookDao bookDao = (BookDao) applicationContext.getBean("bookDao");
        System.out.println(bookDao);
        BookService bookService = (BookService) applicationContext.getBean(BookService.class);
        System.out.println(bookService);
    }
}
